<div class="shop_profile">
    {if $user.wishlist|@sizeof > 0}
    <div id="shop_profile_wl">
        <div class="box685titleblue">
            {if $smarty.session.user.id == $user.id}
            <div class="bigtop-titre">Ma wishlist</div>
            {else}
            <div class="bigtop-titre">Sa wishlist</div>
            {/if}
            <div class="bluebigtop-nb">{$user.wishlist|@sizeof}</div>
        </div>
        <div class="box685content box">
            {if !isset($user.wishlist[0])}
            <div class="shop_profile_visu empty">&nbsp;</div>
            {else}
            <div class="shop_profile_visu">
                <table>
                    <tr><td>
                        <img src="{$user.wishlist[0].maxi}" alt="{$user.wishlist[0]}" />
                    </td></tr>
                </table>
                <div class="visu_desc">
                    <div class="name">
                        <table>
                            <tr><td>
                                <a href="{$user.wishlist[0].url}" title="{$user.wishlist[0]}">
                                    {$user.wishlist[0]}
                                </a>
                            </td></tr>
                        </table>
                    </div>
                    <div class="price">{$user.wishlist[0].prix} &euro;</div>
                    <div class="add">
                        <a href="{$user.wishlist[0].url}">
                           <img src="{$IMG_PATH}shop/add_mini.png" alt="Ajouter au panier" />
                        </a>
                    </div>
                </div>
            </div>
            {/if}
            <div class="shop_profile_products">
                {section name=wl loop=8}
                    {if isset($user.wishlist[wl])}
                        <div class="product_profile">
                            <table>
                                <tr><td>
                                    <a href="{$user.wishlist[wl].url}" id="{$user.wishlist[wl].id}" title="{$user.wishlist[wl]}" class="link_product">
                                        <img src="{$user.wishlist[wl].imgListing}" alt="{$user.wishlist[wl]}" />
                                    </a>
                                </td></tr>
                            </table>
                        </div>
                    {else}
                        <div class="product_profile empty"></div>
                    {/if}
                {/section}
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="box685ass"></div>
    </div>
    {/if}

    {if $user.purchases|@sizeof > 0}
    <div id="shop_profile_purchases">
         <div class="box685titleblue">
             {if $smarty.session.user.id == $user.id}
            <div class="bigtop-titre">Mes achats</div>
            {else}
            <div class="bigtop-titre">Ses achats</div>
            {/if}
            <div class="bluebigtop-nb">{$user.purchases|@sizeof}</div>
         </div>
         <div class="box685content box">
             {if !isset($user.purchases[0])}
             <div class="shop_profile_visu empty">&nbsp;</div>
             {else}
             <div class="shop_profile_visu">
                <table>
                    <tr><td>
                        <img src="{$user.purchases[0].maxi}" alt="{$user.purchases[0]}" />
                    </td></tr>
                </table>
                <div class="visu_desc">
                    <div class="name">
                        <table>
                            <tr><td>
                                <a href="{$user.purchases[0].url}" title="{$user.purchases[0]}">
                                    {$user.purchases[0]}
                                </a>
                            </td></tr>
                        </table>
                    </div>
                    <div class="price">{$user.purchases[0].prix} &euro;</div>
                    <div class="add">
                        <a href="{$user.wishlist[0].url}">
                            <img src="{$IMG_PATH}shop/add_mini.png" alt="Ajouter au panier" />
                        </a>
                    </div>
                </div>
            </div>
            {/if}
            <div class="shop_profile_products">
                {section name=p loop=8}
                    {if isset($user.purchases[p])}
                        <div class="product_profile">
                            <table>
                                <tr><td>
                                    <a href="{$user.purchases[p].url}" id="{$user.purchases[p].id}" title="{$user.purchases[p]}" class="link_product">
                                        <img src="{$user.purchases[p].imgListing}" alt="{$user.purchases[p]}" />
                                    </a>
                                </td></tr>
                            </table>
                        </div>
                    {else}
                        <div class="product_profile empty"></div>
                    {/if}
                {/section}
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="box685ass"></div>
    </div>
    {/if}
</div>